<!DOCTYPE html>
<html>
<head>
    <title>收货地址管理</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <#include "../../../../include/resources.html">

        <script type="text/javascript">
            var dataGrid;
            var winWidth =  900; //弹出窗口宽度
            var winHeight = 500; //弹出窗口高度
            var val1 = 1;
            var val2 = 0;

            $(function() {
                dataGrid = $('#dataGrid').datagrid({
                    url : 'receivingInfoList.html',
                    fit : true,
                    fitColumns : true,
                    border : false,
                    pagination : true,
                    idField : 'id',
                    pageSize : pageSize,
                    pageNums :1,
                    pageList : pageList,
                    sortName : 'id',
                    sortOrder : 'asc',
                    checkOnSelect : false,
                    selectOnCheck : false,
                    nowrap : false,
                    singleSelect:true,
                    columns : [ [
                        { field: 'id', title: '编号', width: 10, checkbox : false},
                        { field: 'userName', title: '用户名', width: 40, checkbox : false},
                        { field: 'name', title: '收件人姓名', width: 40, sortable:false},
                        { field: 'area', title: '所在地区', width:40 , sortable:false },
                        { field: 'address', title: '详细地址', width: 100, sortable:false},
                        { field: 'status', title: '状态', width: 40, sortable:false,formatter:function(value,row,index){
                            if(row.status == 0)
                                return "默认";
                            else if(row.status == 1)
                                return "有效";
                            else if(row.status == -1)
                                return "删除";
                        } },
                        { field: 'defultInfo', title: '是否为默认地址', width: 40, sortable:false,formatter:function(value,row,index){
                            if(row.defultInfo == 0)
                                return "否";
                            else if(row.defultInfo == 1)
                                return "是";
                        } },
                        { field: 'mobile', title: '收件人手机', width: 60, sortable:false },
                        { field: 'phone', title: '收件人电话', width: 60, sortable:false },
                        { field: 'addTime', title: '创建时间', width: 80, sortable:false,formatter: function(value,row,index){
                            return getLocalTime(value,4);
                        }
                        }
                    ] ],
                    toolbar : '#toolbar',
                    onLoadSuccess : function() {
                        $('#searchForm table').show();
                        parent.$.messager.progress('close');
                    }
                });
            });

        </script>
</head>
<body style="padding:0 20px;" >
<div class="easyui-layout" data-options="fit : true,border : false">
    <div data-options="region:'north',border:false,collapsible:false" id="searchBox">
        <div class="sLeft">
            <form id="searchForm">
                <input type="text"  name="searchName" class="sInput" placeholder="输入名称进行搜索" autocomplete="off" onkeydown="if(event.keyCode == 13){ $.fn.dataGridOptions.searchFun('#searchForm');return false;}"/><a href="javascript:;" title="查询" class="sBtn" onclick="$.fn.dataGridOptions.searchFun('#searchForm');">查询</a>
                <a href="javascript:void(0);" class="reloadIcon" onclick="dataGrid.datagrid('reload');" title="刷新" ><i class="iconfont">&#xe603;</i></a>
            </form>
        </div>
        <form id="showAdw">
        </form>
    </div>
    <div data-options="region:'center'" style="margin-top:30px;padding-bottom:30px;">
        <table id="dataGrid"></table>
    </div>
</div>
</body>
</html>
<script src="${theme_dir}/js/search.js"></script>